<!DOCTYPE html>
<html>
  <head>
    <title>Please log in</title>
    <link rel="stylesheet" type="text/css" href="<%= login_base %>/login.css" />
  </head>
  <body class="access">
    <form method="POST" action="<%= login_base %>">
      <input type="hidden" name="url" value="<%= options[:url] %>" />
      <% if options[:logged_out] %>
        <h1>Logged out</h1>
      <% else %>
        <h1>Please log in</h1>
      <% end %>
      <% if options[:login_failed] %>
        <p class="error">Login failed</p>
      <% elsif options[:session_expired] %>
        <p class="error">Session expired</p>
      <% end %>
      <div class="contents">
        <div class="row">
          <div class="label">
            <label for="username">Username</label>
          </div>
          <div class="value">
            <input type="text" id="username" name="username" class="text" value="<%= escape_html(options[:username]) %>"/>
          </div>
        </div>
        <div class="row">
          <div class="label">
            <label for="password">Password</label>
          </div>
          <div class="value">
            <input type="password" id="password" name="password" class="text" />
          </div>
        </div>
        <div class="row">
          <div class="value">
            <input type="submit" value="Log in" class="button" />
          </div>
        </div>
      </div>
  </body>
</html>
